package cn.git.bbs.core.controller;

import cn.git.bbs.core.bean.product.Sku;
import cn.git.bbs.core.service.sku.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class SkuController {
    @Autowired
    private SkuService skuService;
    @RequestMapping(value = "/sku/list.do")
    public String  skuList(Model model, Long productId){
        List<Sku> skus = skuService.selectSkuList(productId);
        model.addAttribute("skus",skus);
        return "sku/list";
    }
}
